<template>
  <section :class="cname">
        <swiper :options="options" :not-next-tick="options.notNextTick">
            <slot></slot>
            <div class="swiper-pagination" v-if="options.pagination" slot="pagination"/>
        </swiper>
  </section>
</template>

<script>
export default{
  name: 'Slider',
  props: {
    cname: {
      type: String,
      default: ''
    },
    options: {
      type: Object,
      default () {
        return {
          autoplay: true,
          loop: true,
          pagination: {
            el: '.swiper-pagination'
          },
          notNextTick: false
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
